refactor: single-window IDC auth with JSON API and token selection fixes#1
Open
refactor: single-window IDC auth with JSON API and token selection fixes#1
Conversation
…n handling and sync - Remove modelId/tools from CodeWhisperer request shape for alignment - Base region handling on profileArn with regex extraction - Improve sync operations and refresh token handling - Add account cleanup and profileArn from state - Enhance request error logging - Inject fetch into provider options - Add IDC region handling module Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Fix claude-haiku-4-5 model ID to use correct backend format - Add claude-haiku-4-5-thinking, claude-sonnet-4-5-1m, claude-sonnet-4-5-1m-thinking - Add non-Claude models: nova-swe, gpt-oss-120b, qwen3-coder-480b, minimax-m2, kimi-k2-thinking - Rename model aliases for cleaner naming (remove date suffixes) - Update README with new model examples
cdd6b9f to
4916106
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
@awsapps.localaccounts from Kiro CLI sync (and stale tokens) could be selected, leading to 403 AccessDeniedException ("bearer token is invalid").auth.loaderreturned an emptyapiKey.What Changed (User-facing)
What Changed (Implementation)
GET /serves a combined page for Start URL + Region + Begin + code + status polling (src/plugin/auth-page.ts).GET /beginreturns JSON{ verificationUrl, verificationUriComplete, userCode, region }and triggers server-side token polling (src/plugin/server.ts)./statusincludesmessagealiasingerror;/error?message=...is parsed and rendered correctly.origin + /startand can follow redirects to canonical*.awsapps.comportal hosts (src/kiro/oauth-idc.ts).src/plugin/config/schema.ts).src/plugin/server.ts).src/plugin/accounts.ts).src/core/auth/auth-handler.ts,src/core/auth/idc-auth-method.ts).src/plugin/sync/kiro-cli.ts).auth.loaderreturnsapiKeyderived from stored auth so OpenCode UI can display connected (src/plugin.ts).maxsupport (src/core/request/thinking.ts,src/core/request/request-handler.ts,README.md).Tests
npm testnpm run typecheckNotable Behavior Changes / Risks
/beginis now JSON (breaking for any consumers relying on it as an HTML navigation endpoint).